<template>
    <div>
        <mt-swipe :auto="2000">
            <mt-swipe-item v-for="v of swipeImgList" :key="v.img">
                <!-- 老师这里是把返回的对象增加了个属性，让src和img属性值相等 -->
                <img :src="v.img ? v.img : v.src" :class="{ w100: isW100 }">
            </mt-swipe-item>
        </mt-swipe>
    </div>
</template>

<script>
    export default {
        props: ['swipeImgList','isW100'],
    }
</script>

<style lang="scss" scoped>
    .mint-swipe {
        height: 200px;
        text-align: center;
        overflow: hidden;
        .mint-swipe-item {
            img {
                height: 100%;
            }
            .w100 {
                width: 100%;
            }
        }
    }
</style>

